#!/usr/bin/env bash
set -euo pipefail
if ip link show tap0 &>/dev/null; then
  echo "[*] Removing tap0 ..."
  sudo ip link set tap0 down || true
  sudo ip tuntap del tap0 mode tap
  echo "[✓] tap0 removed"
else
  echo "[=] tap0 does not exist"
fi
